home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / MacMud / Unix / syslog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-06-27  |  2.7 KB  |  65 lines  |  [TEXT/MPS ]

  1. /*
  2.  * Copyright (c) 1982, 1986 Regents of the University of California.
  3.  * All rights reserved.  The Berkeley software License Agreement
  4.  * specifies the terms and conditions for redistribution.
  5.  */
  6.  
  7. /*
  8.  *  Facility codes
  9.  */
  10.  
  11. #define LOG_KERN        (0<<3)  /* kernel messages */
  12. #define LOG_USER        (1<<3)  /* random user-level messages */
  13. #define LOG_MAIL        (2<<3)  /* mail system */
  14. #define LOG_DAEMON      (3<<3)  /* system daemons */
  15. #define LOG_AUTH        (4<<3)  /* security/authorization messages */
  16. #define LOG_SYSLOG      (5<<3)  /* messages generated internally by syslogd */
  17. #define LOG_LPR         (6<<3)  /* line printer subsystem */
  18. #define LOG_NEWS        (7<<3)  /* netnews subsystem */
  19. #define LOG_UUCP        (8<<3)  /* uucp subsystem */
  20. #define LOG_CRON        (15<<3) /* cron/at subsystem */
  21.         /* other codes through 15 reserved for system use */
  22. #define LOG_LOCAL0      (16<<3) /* reserved for local use */
  23. #define LOG_LOCAL1      (17<<3) /* reserved for local use */
  24. #define LOG_LOCAL2      (18<<3) /* reserved for local use */
  25. #define LOG_LOCAL3      (19<<3) /* reserved for local use */
  26. #define LOG_LOCAL4      (20<<3) /* reserved for local use */
  27. #define LOG_LOCAL5      (21<<3) /* reserved for local use */
  28. #define LOG_LOCAL6      (22<<3) /* reserved for local use */
  29. #define LOG_LOCAL7      (23<<3) /* reserved for local use */
  30.  
  31. #define LOG_NFACILITIES 24      /* maximum number of facilities */
  32. #define LOG_FACMASK     0x03f8  /* mask to extract facility part */
  33.  
  34. /*
  35.  *  Priorities (these are ordered)
  36.  */
  37.  
  38. #define LOG_EMERG       0       /* system is unusable */
  39. #define LOG_ALERT       1       /* action must be taken immediately */
  40. #define LOG_CRIT        2       /* critical conditions */
  41. #define LOG_ERR         3       /* error conditions */
  42. #define LOG_WARNING     4       /* warning conditions */
  43. #define LOG_NOTICE      5       /* normal but signification condition */
  44. #define LOG_INFO        6       /* informational */
  45. #define LOG_DEBUG       7       /* debug-level messages */
  46.  
  47. #define LOG_PRIMASK     0x0007  /* mask to extract priority part (internal) */
  48.  
  49. /*
  50.  * arguments to setlogmask.
  51.  */
  52. #define LOG_MASK(pri)   (1 << (pri))            /* mask for one priority */
  53. #define LOG_UPTO(pri)   ((1 << ((pri)+1)) - 1)  /* all priorities through pri */
  54. /*
  55.  *  Option flags for openlog.
  56.  *
  57.  *      LOG_ODELAY no longer does anything; LOG_NDELAY is the
  58.  *      inverse of what it used to be.
  59.  */
  60. #define LOG_PID         0x01    /* log the pid with each message */
  61. #define LOG_CONS        0x02    /* log on the console if errors in sending */
  62. #define LOG_ODELAY      0x04    /* delay open until syslog() is called */
  63. #define LOG_NDELAY      0x08    /* don't delay open */
  64. #define LOG_NOWAIT      0x10    /* if forking to log on console, don't wait() */
  65.